/**
 * 
 */
package com.jolestar.yayaweibotong.service.impl;

import javax.servlet.http.HttpServletRequest;

import com.jolestar.yayaweibotong.ServiceType;
import com.jolestar.yayaweibotong.service.OAuthService;

/**
 * @author jolestar@gmail.com
 *
 */
public abstract class AbstractOAuthService implements OAuthService{
	
	protected String generateCallback(HttpServletRequest request,ServiceType serviceType){
		return "http://"+request.getServerName()+(request.getServerPort()==80?"":":"+request.getServerPort())
		+ "/callback?service_type=" + serviceType.name();
	}
}
